package com.example.mntz.model;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

public class CmExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public CmExample() {
        oredCriteria = new ArrayList<Criteria>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<Criterion>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andCmIdIsNull() {
            addCriterion("cm_id is null");
            return (Criteria) this;
        }

        public Criteria andCmIdIsNotNull() {
            addCriterion("cm_id is not null");
            return (Criteria) this;
        }

        public Criteria andCmIdEqualTo(Integer value) {
            addCriterion("cm_id =", value, "cmId");
            return (Criteria) this;
        }

        public Criteria andCmIdNotEqualTo(Integer value) {
            addCriterion("cm_id <>", value, "cmId");
            return (Criteria) this;
        }

        public Criteria andCmIdGreaterThan(Integer value) {
            addCriterion("cm_id >", value, "cmId");
            return (Criteria) this;
        }

        public Criteria andCmIdGreaterThanOrEqualTo(Integer value) {
            addCriterion("cm_id >=", value, "cmId");
            return (Criteria) this;
        }

        public Criteria andCmIdLessThan(Integer value) {
            addCriterion("cm_id <", value, "cmId");
            return (Criteria) this;
        }

        public Criteria andCmIdLessThanOrEqualTo(Integer value) {
            addCriterion("cm_id <=", value, "cmId");
            return (Criteria) this;
        }

        public Criteria andCmIdIn(List<Integer> values) {
            addCriterion("cm_id in", values, "cmId");
            return (Criteria) this;
        }

        public Criteria andCmIdNotIn(List<Integer> values) {
            addCriterion("cm_id not in", values, "cmId");
            return (Criteria) this;
        }

        public Criteria andCmIdBetween(Integer value1, Integer value2) {
            addCriterion("cm_id between", value1, value2, "cmId");
            return (Criteria) this;
        }

        public Criteria andCmIdNotBetween(Integer value1, Integer value2) {
            addCriterion("cm_id not between", value1, value2, "cmId");
            return (Criteria) this;
        }

        public Criteria andCmUserIsNull() {
            addCriterion("cm_user is null");
            return (Criteria) this;
        }

        public Criteria andCmUserIsNotNull() {
            addCriterion("cm_user is not null");
            return (Criteria) this;
        }

        public Criteria andCmUserEqualTo(Integer value) {
            addCriterion("cm_user =", value, "cmUser");
            return (Criteria) this;
        }

        public Criteria andCmUserNotEqualTo(Integer value) {
            addCriterion("cm_user <>", value, "cmUser");
            return (Criteria) this;
        }

        public Criteria andCmUserGreaterThan(Integer value) {
            addCriterion("cm_user >", value, "cmUser");
            return (Criteria) this;
        }

        public Criteria andCmUserGreaterThanOrEqualTo(Integer value) {
            addCriterion("cm_user >=", value, "cmUser");
            return (Criteria) this;
        }

        public Criteria andCmUserLessThan(Integer value) {
            addCriterion("cm_user <", value, "cmUser");
            return (Criteria) this;
        }

        public Criteria andCmUserLessThanOrEqualTo(Integer value) {
            addCriterion("cm_user <=", value, "cmUser");
            return (Criteria) this;
        }

        public Criteria andCmUserIn(List<Integer> values) {
            addCriterion("cm_user in", values, "cmUser");
            return (Criteria) this;
        }

        public Criteria andCmUserNotIn(List<Integer> values) {
            addCriterion("cm_user not in", values, "cmUser");
            return (Criteria) this;
        }

        public Criteria andCmUserBetween(Integer value1, Integer value2) {
            addCriterion("cm_user between", value1, value2, "cmUser");
            return (Criteria) this;
        }

        public Criteria andCmUserNotBetween(Integer value1, Integer value2) {
            addCriterion("cm_user not between", value1, value2, "cmUser");
            return (Criteria) this;
        }

        public Criteria andCmToUserIsNull() {
            addCriterion("cm_to_user is null");
            return (Criteria) this;
        }

        public Criteria andCmToUserIsNotNull() {
            addCriterion("cm_to_user is not null");
            return (Criteria) this;
        }

        public Criteria andCmToUserEqualTo(Integer value) {
            addCriterion("cm_to_user =", value, "cmToUser");
            return (Criteria) this;
        }

        public Criteria andCmToUserNotEqualTo(Integer value) {
            addCriterion("cm_to_user <>", value, "cmToUser");
            return (Criteria) this;
        }

        public Criteria andCmToUserGreaterThan(Integer value) {
            addCriterion("cm_to_user >", value, "cmToUser");
            return (Criteria) this;
        }

        public Criteria andCmToUserGreaterThanOrEqualTo(Integer value) {
            addCriterion("cm_to_user >=", value, "cmToUser");
            return (Criteria) this;
        }

        public Criteria andCmToUserLessThan(Integer value) {
            addCriterion("cm_to_user <", value, "cmToUser");
            return (Criteria) this;
        }

        public Criteria andCmToUserLessThanOrEqualTo(Integer value) {
            addCriterion("cm_to_user <=", value, "cmToUser");
            return (Criteria) this;
        }

        public Criteria andCmToUserIn(List<Integer> values) {
            addCriterion("cm_to_user in", values, "cmToUser");
            return (Criteria) this;
        }

        public Criteria andCmToUserNotIn(List<Integer> values) {
            addCriterion("cm_to_user not in", values, "cmToUser");
            return (Criteria) this;
        }

        public Criteria andCmToUserBetween(Integer value1, Integer value2) {
            addCriterion("cm_to_user between", value1, value2, "cmToUser");
            return (Criteria) this;
        }

        public Criteria andCmToUserNotBetween(Integer value1, Integer value2) {
            addCriterion("cm_to_user not between", value1, value2, "cmToUser");
            return (Criteria) this;
        }

        public Criteria andCmIsNull() {
            addCriterion("cm is null");
            return (Criteria) this;
        }

        public Criteria andCmIsNotNull() {
            addCriterion("cm is not null");
            return (Criteria) this;
        }

        public Criteria andCmEqualTo(String value) {
            addCriterion("cm =", value, "cm");
            return (Criteria) this;
        }

        public Criteria andCmNotEqualTo(String value) {
            addCriterion("cm <>", value, "cm");
            return (Criteria) this;
        }

        public Criteria andCmGreaterThan(String value) {
            addCriterion("cm >", value, "cm");
            return (Criteria) this;
        }

        public Criteria andCmGreaterThanOrEqualTo(String value) {
            addCriterion("cm >=", value, "cm");
            return (Criteria) this;
        }

        public Criteria andCmLessThan(String value) {
            addCriterion("cm <", value, "cm");
            return (Criteria) this;
        }

        public Criteria andCmLessThanOrEqualTo(String value) {
            addCriterion("cm <=", value, "cm");
            return (Criteria) this;
        }

        public Criteria andCmLike(String value) {
            addCriterion("cm like", value, "cm");
            return (Criteria) this;
        }

        public Criteria andCmNotLike(String value) {
            addCriterion("cm not like", value, "cm");
            return (Criteria) this;
        }

        public Criteria andCmIn(List<String> values) {
            addCriterion("cm in", values, "cm");
            return (Criteria) this;
        }

        public Criteria andCmNotIn(List<String> values) {
            addCriterion("cm not in", values, "cm");
            return (Criteria) this;
        }

        public Criteria andCmBetween(String value1, String value2) {
            addCriterion("cm between", value1, value2, "cm");
            return (Criteria) this;
        }

        public Criteria andCmNotBetween(String value1, String value2) {
            addCriterion("cm not between", value1, value2, "cm");
            return (Criteria) this;
        }

        public Criteria andCmTimeIsNull() {
            addCriterion("cm_time is null");
            return (Criteria) this;
        }

        public Criteria andCmTimeIsNotNull() {
            addCriterion("cm_time is not null");
            return (Criteria) this;
        }

        public Criteria andCmTimeEqualTo(Date value) {
            addCriterion("cm_time =", value, "cmTime");
            return (Criteria) this;
        }

        public Criteria andCmTimeNotEqualTo(Date value) {
            addCriterion("cm_time <>", value, "cmTime");
            return (Criteria) this;
        }

        public Criteria andCmTimeGreaterThan(Date value) {
            addCriterion("cm_time >", value, "cmTime");
            return (Criteria) this;
        }

        public Criteria andCmTimeGreaterThanOrEqualTo(Date value) {
            addCriterion("cm_time >=", value, "cmTime");
            return (Criteria) this;
        }

        public Criteria andCmTimeLessThan(Date value) {
            addCriterion("cm_time <", value, "cmTime");
            return (Criteria) this;
        }

        public Criteria andCmTimeLessThanOrEqualTo(Date value) {
            addCriterion("cm_time <=", value, "cmTime");
            return (Criteria) this;
        }

        public Criteria andCmTimeIn(List<Date> values) {
            addCriterion("cm_time in", values, "cmTime");
            return (Criteria) this;
        }

        public Criteria andCmTimeNotIn(List<Date> values) {
            addCriterion("cm_time not in", values, "cmTime");
            return (Criteria) this;
        }

        public Criteria andCmTimeBetween(Date value1, Date value2) {
            addCriterion("cm_time between", value1, value2, "cmTime");
            return (Criteria) this;
        }

        public Criteria andCmTimeNotBetween(Date value1, Date value2) {
            addCriterion("cm_time not between", value1, value2, "cmTime");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {

        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}